import { get, post } from "./http"

//--菜单模块start------------
// 添加
export const reqmenuadd = params => post("/api/menuadd", params);

//列表
export const reqmenulist = params => get("/api/menulist", params)

//删除
export const reqmenudelete = params => post("/api/menudelete", params)

//详情
export const reqmenuinfo = params => get("/api/menuinfo", params)

//修改
export const reqmenuedit = params => post("/api/menuedit", params)
//--菜单模块end------------



//--角色模块start------------
// 添加
export const reqroleadd = params => post("/api/roleadd", params);

//列表
export const reqrolelist = () => get("/api/rolelist")

//删除
export const reqroledelete = params => post("/api/roledelete", params)

//详情
export const reqroleinfo = params => get("/api/roleinfo", params)

//修改
export const reqroleedit = params => post("/api/roleedit", params)
//--角色模块end------------


//--管理员模块start------------
// 添加
export const requseradd = params => post("/api/useradd", params);

//列表
export const requserlist = params => get("/api/userlist", params)

//删除
export const requserdelete = params => post("/api/userdelete", params)

//详情
export const requserinfo = params => get("/api/userinfo", params)

//修改
export const requseredit = params => post("/api/useredit", params)

//总数
export const requsercount = () => get("/api/usercount")
//--管理员模块end------------



//--分类模块start------------
// 添加
export const reqcateadd = params => post("/api/cateadd", params, true);

//列表
export const reqcatelist = params => get("/api/catelist", params)

//删除
export const reqcatedelete = params => post("/api/catedelete", params)

//详情
export const reqcateinfo = params => get("/api/cateinfo", params)

//修改
export const reqcateedit = params => post("/api/cateedit", params)

//--分类模块end------------


//--规格模块start------------
// 添加
export const reqspecsadd = params => post("/api/specsadd", params);

//列表
export const reqspecslist = params => get("/api/specslist", params)

//删除
export const reqspecsdelete = params => post("/api/specsdelete", params)

//详情
export const reqspecsinfo = params => get("/api/specsinfo", params)

//修改
export const reqspecsedit = params => post("/api/specsedit", params)

//总数
export const reqspecscount = () => get("/api/specscount")
//--规格模块end------------

// //登录
export const reqLogin = (params) => post("/api/userlogin", params)

//--商品模块start------------
// 添加
export const reqgoodsadd = params => post("/api/goodsadd", params, true);

//列表
export const reqgoodslist = params => get("/api/goodslist", params)

//删除
export const reqgoodsdelete = params => post("/api/goodsdelete", params)

//详情
export const reqgoodsinfo = params => get("/api/goodsinfo", params)

//修改
export const reqgoodsedit = params => post("/api/goodsedit", params, true)

//总数
export const reqgoodscount = () => get("/api/goodscount")
//--商品模块end------------